function P=LinSys_step(G,P,k)
%calculate control input U in last step
K=place(P.A,P.B,P.Poles)
P.U=-K*P.X;

%calculate noisy state X in current step
n=size(P.X,1);
W=randn_vec(P.Q);
P.X=P.A*P.X+P.B*P.U+W;

%get noisy output Y in current step
V=randn_vec(P.R);
P.Y=P.C*P.X+P.D*P.U+V;

%%estimate X,Y,P via Kalman filter
P=KF_step(P);

%update player's position (step,innovation)
P.pos=[G.step,P.Y_err];

%set player's Vars in current step
P.Vars=[P.X;P.Y;P.X_est;P.Y_pre;P.P_est]';

%set infomation hints
P.info.String={
['X:',num2str(P.X)],
['X_{pre}:',num2str(P.X_pre)],
['X_{est}:',num2str(P.X_est)],
['Y_{pre}:',num2str(P.Y_pre)],
['P_{est}:',num2str(P.P_est)],
['Y_{err}:',num2str(P.Y_err)]
}

